package com.pgybook.db.entity.mapper;

import org.springframework.stereotype.Repository;
import com.pgybook.db.entity.domain.StaffLibraryEx;
import com.pgybook.db.entity.domain.StaffLibraryKey;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;

@Repository
public interface StaffLibraryMapper {
    int countByExample(StaffLibraryEx example);

    int deleteByExample(StaffLibraryEx example);

    @Delete({
            "delete from stafflibrary",
            "where STAFFID = #{staffid,jdbcType=INTEGER}",
            "and LIBID = #{libid,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(StaffLibraryKey key);

    @Insert({
            "insert into stafflibrary (STAFFID, LIBID)",
            "values (#{staffid,jdbcType=INTEGER}, #{libid,jdbcType=INTEGER})"
    })
    int insert(StaffLibraryKey record);

    int insertSelective(StaffLibraryKey record);

    List<StaffLibraryKey> selectByExample(StaffLibraryEx example);

    int updateByExampleSelective(@Param("record") StaffLibraryKey record, @Param("example") StaffLibraryEx example);

    int updateByExample(@Param("record") StaffLibraryKey record, @Param("example") StaffLibraryEx example);
}
